|
|
||||||||||||
|
First thing in a .bos file will often be as in this one, the piece
list. We have to declare the names of all model objects/pieces we intent
to animate in TA. The pieces are names of the different parts in your
3D model, arranged under a tech tree. If we have a unit with just the
groundplate piece (often called base), and a body piece, it would look
as our example does.
Next we declare the names of then variables we will be using to control
actions. This is our static-var line. Sometimes either piece or
static-var lines are very long, and wrap around to the next line. If you
want to avoid this, end one with a ; and start the next with piece
or static-var again. This means that every time you will want to store
numbers to calculate with, you must tell the program what you want to
use as such storage.
This is how a function is listed in TA. The name is given, as well as
any variables/parameters to be passed to this function within the (
), as shall be seen later. The contents is then encapsulated in {
and }. Both types of line do not end with a semicolon ";".
Every unit in TA uses this function as soon as something starts to
build it, before it's complete and selectable (or converted to a Dragon's
Tooth). In here you should declare the starting states of every variable
you will be using, as well as hiding weapon flares and starting other
animations.
his is another function every TA unit should have. This time we're passed a variable, which this function calls piecenum. This variable is only used within this function, so other functions may have variables with the same name but different values. The static-vars we listed earlier are used by all of the script, and only have one value at any instance In this case, the TA engine will call this function and awaits the name
of the piece to be used as the sweetspot. This is the piece that
enemy weapons will try to aim at when firing. To set a moving part as
a piecenum makes it . This is not the piece which will cause damage to
your unit if hit, that's the groundplate. Usually the sweetspot is defined
as the groundplate/base, or the first branch object in the model object
tree, and normally only child of the groundplate (in this case it's body,
sometimes the pelvis if a walking k-bot for example).
Compiling BOS...
Making COB... Wrote C:\Games\TA\unitmaking\Proud's Scripting guide\examples\example1.cob
|
||||||||||||
| © Proud like a god (and a little Storm) |